<template>
    <div>
        课程页面
        <br>
        <button @click="goJingpin">精品贴</button>
    </div>

</template>

<script setup>
    import { useRouter } from 'vue-router'
    const router = useRouter() // 获取路由实例
    const goJingpin = () => {
        alert('你要跳转到精品贴了~~')
        // 要去精品贴路由
        router.push({name:'tiezi', params: {id: 7456}})
    }
</script>

<style scoped>
div {
    height: 200px;
    text-align: center;
    background-color: #f60;
}
button{
    background-color: aqua;
    border: none;
    color: white;
    padding: 15px 32px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 16px;
    border-radius: 6px;
    margin-top: 20px;
}
</style>